package com.zhoug.demo.sendpush;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @description: 类的简要描述
 * @author: 35574
 * @date: 2025/11/5 15:11
 */
public class Utils {

    public static byte[] readAllBytes(InputStream is) throws IOException {
        byte[] buffer = new byte[1024];
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        int n;
        while ((n = is.read(buffer)) != -1) {
            baos.write(buffer, 0, n);
        }
        return baos.toByteArray();
    }


}
